//
//  HEGoodsDetailsRecomCell.m
//  HealthFamily
//
//  Created by LOOK on 2020/10/25.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import "HEGoodsDetailsRecomCell.h"
#import "HEGoodsRecomView.h"

@interface HEGoodsDetailsRecomCell ()

@property (nonatomic, strong) HEGoodsRecomView *recomView;
@property (nonatomic, strong) UILabel *titleLb;

@end

@implementation HEGoodsDetailsRecomCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initUI];
    }
    return self;
}

- (void)initUI {
    // Initialization code
    
    _titleLb = [UILabel new];
    _titleLb.text = @"相关推荐";
    _titleLb.font = DYBlodFont(18);
    [self.contentView addSubview:_titleLb];
    
    _recomView = [[HEGoodsRecomView alloc] init];
    [self.contentView addSubview:_recomView];
    
    [_titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).mas_offset(15);
        make.left.equalTo(self.contentView).mas_offset(15);
        make.right.equalTo(self.contentView).mas_offset(-15);
    }];
    
    [_recomView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_titleLb.mas_bottom).mas_offset(15);
        make.left.right.equalTo(self.contentView);
        make.bottom.equalTo(self.contentView.mas_bottom);
    }];

}

- (void)refreshContent:(GDFiterCellModel *)fiterModel formModel:(GDFormModel *)formModel indexPath:(NSIndexPath *)indexPath {
    _recomView.goodsArr = formModel.recomGoodsArr;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
